
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
swim-proto-js
Advanced tools
The Swim protocol library can be used in any standard JavaScript environment.
Use npm
to incorporate the library into Node.js projects.
npm install --save swim-proto-js
var proto = require('swim-proto-js');
var envelope = proto.parse('@event(node: "house#kitchen", lane: "light/on")');
proto.stringify(envelope);
The Swim protocol defines a set of RECON datatypes used for URI-linked multiplexed structural messaging.
Send an event message to a node on some lane, or receive an event
message that propagated through a linked node on a subscribed lane.
node_uri
and lane_uri
always refer to origin node and lane to which
the event was published. link_uris
enumerates all links the
event passed through prior to reaching the receiver.
<< @event([node:] <node_uri>, [lane:] <lane_uri>[, via: <link_uris>]) <body>
<< @event(node: "swim://iot.example.com/L01FE", lane: "light/off", via: "house#kitchen/light) {
time: @date("2015-02-03T07:53:31-0800")
}
<< @event(node: "swim://iot.example.com/SD02FD", lane: "alarm/smoke", via: "house#garage/smoke_detector") {
time: @data("2015-02-03T11:17:12-0800")
concentration: 330 @ppm
duration: 10 @seconds
}
Send a command message to a node on some lane, or receive a command
message that propagated through a linked node on a subscribed lane.
node_uri
and lane_uri
always refer to origin node and lane to which
the command was published. link_uris
enumerates all links the
command passed through prior to reaching the receiver.
<< @command([node:] <node_uri>, [lane:] <lane_uri>[, via: <link_uris>]) <body>
<< @command(node: "house#kitchen", lane: "light/on")
<< @command(node: "swim://town.example.com/fire_dept", lane: "alarm/silence", via: "house") {
reason: "homeowner reported false alarm"
}
Request a replay of events that have propagated through a node on some lane. The receiver should respond with the minimum set of events necessary to reconstruct the receiver's current state, as it pertains to the requested message lane.
A @sync request establishes a corresponding link, if one doesn't already exist.
>> @sync([node:] <node_uri>, [lane:] <lane_uri>[, prio: <priority>])
<< @synced([node:] <node_uri>, [lane:] <lane_uri>)
>> @sync(node: "house", lane: "light/level", prio: 0.5)
<< @event(node: "house#kitchen", lane: "light/level") { level: 100 }
<< @event(node: "house#hallway", lane: "light/level") { level: 0 }
<< @synced(node: "house", lane: "light/level")
Subscribe to messages that flow through some node on some lane.
>> @link([node:] <node_uri>, [lane:] <lane_uri>[, prio: <priority>])
<< @linked([node:] <node_uri>, [lane:] <lane_uri>[, prio: <priority>])
>> @link("house#kitchen", "light")
<< @linked(node: "house#kitchen", lane: "light")
>> @link(node: "house", lane: "alarm", prio: 0.5)
<< @linked(node: "house", lane: "alarm", prio: 0.5)
Remove an existing message subscription identified by a
(node_uri
, lane_uri
) pair.
>> @unlink([node:] <node_uri>, [lane:] <lane_uri>)
<< @unlinked([node:] <node_uri>, [lane:] <lane_uri>)
Authorizes the connection with credentials contained in <body>
.
>> @auth <body>
<< @authed <body>
De-authorizes the connection.
>> @deauth <body>
<< @deauthed <body>
FAQs
Swim Protocol JavaScript Implementation
We found that swim-proto-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.